<script>
import DBreadcrumbItem from './DBreadcrumbItem.vue';

export default {
  name: 'DBreadcrumb',
  components: {
    DBreadcrumbItem
  },
  props: {
    separator: {
      type: String,
      default: '/'
    },
    items: {
      type: Array,
      default: () => []
    }
  },
  render() {
    const props = {};
    if (this.separator) {
      props.separator = this.separator;
    }
    return (
      <a-breadcrumb props={props}>
        {this.items.length === 0 && this.$slots.default}
        {this.items.length > 0 &&
          this.items.map(i => <d-breadcrumb-item props={i} />)}
      </a-breadcrumb>
    );
  }
};
</script>

<style lang="scss" scoped>
.tw-breadcrumb {
  font-size: 16px;
}
</style>
